package com.quanyan.stadium.enums;

/**
 * Created by xiaoxiao on 16/6/2.
 *
 * 栏目枚举类
 */
public enum GameCategoryEnum {


    CATEGORY_ID_BASKETBALL(1,"1","篮球","赛事编排参数不能为空"),
    CATEGORY_ID_BADMINTON(2,"2","羽毛球", "赛事编排的开始和结束时间不合法"),
    CATEGORY_ID_FOOTBALL(3,"3","足球","上一轮次积分录入存在异常,无法创建当前轮次对战表"),
    CATEGORY_ID_TENNIS(4,"4","网球", "上一轮积分录入异常,无法生存当前轮次对战表"),
    CATEGORY_ID_GYM(10,"10","户外","参数问题,生成对战表失败"),
    CATEGORY_ID_RIDING(11,"11","骑行","当前没有报名队伍,无法创建对战表"),
    CATEGORY_ID_RUNNING(12,"12","跑步","无可用轮次,无法生成对战表");



    public static GameCategoryEnum getMsgById(int id){
        GameCategoryEnum msg = null;
        switch (id) {
            case 1:
                msg = GameCategoryEnum.CATEGORY_ID_BASKETBALL;
                break;
            case 2:
                msg = GameCategoryEnum.CATEGORY_ID_BADMINTON;
                break;
            case 3:
                msg = GameCategoryEnum.CATEGORY_ID_FOOTBALL;
                break;
            case 4:
                msg = GameCategoryEnum.CATEGORY_ID_TENNIS;
                break;
            case 10:
                msg = GameCategoryEnum.CATEGORY_ID_GYM;
                break;
            case 11:
                msg = GameCategoryEnum.CATEGORY_ID_RIDING;
                break;
            case 12:
                msg = GameCategoryEnum.CATEGORY_ID_RUNNING;
                break;
            default:
                break;
        }
        return msg;
    }

    GameCategoryEnum(int id, String code, String name, String label) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.label = label;
    }

    private int id;

    private String code;

    private String name;

    private String label;

    public Integer getId() {
        return id;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getLabel() {
        return label;
    }
}
